#include "stdafx.h"
#include "String.h"

String::String(){
	buffer=0;
	length=0;
}
String::String(TCHAR* initVal){
	length=_tcslen(initVal);
	buffer=(PTSTR)malloc((length+1)*sizeof(TCHAR));
	memcpy(buffer,initVal,(length+1)*sizeof(TCHAR));
}
String::String(uint len){
	length=len;
	buffer=(PTSTR)malloc((length+1)*sizeof(TCHAR));
	buffer[0]=0;
}
String::~String(){
	free(buffer);
}